document.addEventListener('scroll', function () {
    console.log('垂直滚动距离', window.scrollY)
})

const topEl = document.querySelector('.home-bar')
topEl.addEventListener('click', function () {
    window.scrollY = 0;
})

var swiper = new Swiper(".mySwiper", {
    navigation: {
        nextEl: ".swiper-button-next",
        prevEl: ".swiper-button-prev",
    },
});

const containerEL = document.querySelector('.container-outer');
window.addEventListener('scroll', () => {
    if (window.scrollY > 40) {
        containerEL.classList.add('scroll');
    } else {
        containerEL.classList.remove('scroll');
    }
});